<tagLib name="html" />
<include file="Public:header" />
			<include file="Public:menu" />
			<div id="right">
				<div>
					<div class="app_right_count grouptop">
						{$group:name} ({$group:network})
					</div>
					<div class="groupbody">
						<div class="groupleft">
							<div>
								<div class="grouptitle">
									公告
								</div>
								<div class="groupcontent">
									{$group:desc}
								</div>
							</div>
							<php>
								if($grouptopic == "noAccess" ){
							</php>
							<p>你不是群组成员，加入后才能查看讨论区。</p>
							<php>}else{</php>
							<div>
								<div class="grouptitle">
									讨论区
								</div>
								<div class="grouptitle2">
									共<php>echo getRecordCountById('groups_topics','groupid',$group->id)</php>个主题 <a href="__APP__/showboard/{$group:id}">查看所有</a> <a href="#newtopic">发表一个新主题</a>
								</div>
								
								<div class="groupcontent">
									
									<table class="topiclisttable">
										<tbody>
											<tr>
												<th class="title">主题</th>
												<th class="author">作者<br/>回复数</th>
												<th class="review">最后发言</th>
											</tr>
											
											<volist name="grouptopic" id="topic">
											<tr>
												<td class="title">
													
													<php>if($topic->istop==1){</php>[置顶]<php>}</php><a href="__APP__/showtopic/{$topic:id}">{$topic.title|htmlspecialchars}</a>
												</td>
												<td class="author">
													<a href="__APP__/home/{$topic:userid}">{$topic:username}</a><br/>{$topic:revertnum}
												</td>
												<td class="review">
													<a href="__APP__/home/{$topic:lastuserid}">{$topic:username}</a><br/>
													{$topic:lastreverttime|toDate}
												</td>
											</tr>
											</volist>											
										</tbody>
									</table>
									
								</div>
							</div>
							<php>
								if($isManager == 0){
							</php>
							<div>你还不是群组成员，请加入后发表话题</div>
							<php>}else{</php>
							<div>
								<a name="newtopic"></a>
								<h4>
									发表新主题
								</h4>
								<form action="__URL__/savetopic" method="post">
								<p class="newtopic">
									<label>标题</label>
									<input type="text" name="title"/>
								</p>
								<p class="newtopic">
									<label>内容</label>
									<script type="text/javascript" src="__PUBLIC__/Js/FCKeditor/fckeditor.js"></script>
									<textarea id="content" name="content"></textarea>
									<script type="text/javascript"> 
										var oFCKeditor = new FCKeditor( "content","340px;","200px","Basic" ) ; 
										oFCKeditor.BasePath = "__PUBLIC__/Js/FCKeditor/" ; 
										oFCKeditor.ReplaceTextarea() ;
										function resetEditor(){setContents("content",document.getElementById("content").value)}; 
										function saveEditor(){document.getElementById("content").value = getContents("content");} 
									</script>
								</p>
								<p>
									<input type="hidden" name="groupid" value="{$group:id}"/>
									<input type="submit" value="发表新主题"/>
								</p>
								</form>
							</div>
							<php>}}</php>
						</div>
						<div class="groupright">
							<div>
								<ul class="groupul">
									<li>
										<img width="200px" src='__PUBLIC__/Uploads/group/{$group:img}'/>
									</li>
									<li><a href="__APP__/showboard/{$group:id}">查看讨论区</a></li>
									<php>
										if($isManager > 1){
									</php>
									<li><a href="__URL__/editgroup/id/{$group:id}">设置群组</a></li>
									<li><a href="__URL__/setgroupuser/id/{$group:id}">管理成员</a></li>
									<php>
										if(isset($requestCount)){
									</php>
									<li><a class="newrequest" href="__URL__/getgrouprequest/id/{$group:id}">新成员申请(<span id="requestcount">{$requestCount}</span>)</a></li>
									<php>}}
										if($isManager > 0){
									</php>
									<li><a href="__URL__/setgroupuser/id/{$group:id}">邀请好友加入</a></li>
									<php>}</php>
									<php>
										if($isManager == 0){
											if($isRequest == "yes"){
									</php>
												<li>已发送请求，正等待验证</li>
											
									<php>
											}else{
									</php>
												<li><a class="joingroup" href="__URL__/joingroup/id/{$group:id}">加入群组</a></li>
									<php>
											}
									
										}elseif($isManager<3){</php>
									<li><a class="exitgroup" href="__URL__/exitgroup/id/{$group:id}">退出群组</a></li>
									<php>}elseif(3 == $isManager){</php>
									<li><a class="deletegroup" href="__URL__/deletegroup/id/{$group:id}">删除群组</a></li>
									<php>}</php>
									<li><a href="__URL__/group">返回我的群组</a></li>
								</ul>
							</div>
							<div>
								<div class="grouptitle">
									成员
								</div>
								<div class="grouptitle2">
									共<php>echo getRecordCountById('groups_users','groupid',$group->id)</php>个成员 <a href="__URL__/groupuser/id/{$group:id}">查看所有成员</a> 
								</div>
								<div class="groupcontent">
									<ul>
										<volist name="groupuser" id="user">
										<li>
											<a href="__APP__/home/{$user:userid}">
											<img src="__PUBLIC__/Uploads/face/small/{$user:faceimg}"/>
											{$user:username}</a>
										</li>
										</volist>
									</ul>
								</div>
							</div>
							<div>
								<div class="grouptitle">
									群组类型
								</div>
								<div class="groupcontent" id="grouptype">
									{$group:setting}
								</div>
							</div>
							<div>
								<div class="grouptitle">
									管理员
								</div>
								<div>
									<ul class="groupul">
										<volist name="groupmanager" id="manager">
										<li>
											<a href="__APP__/home/{$manager:userid}">
											{$manager:username}
											
											<php>
												if($manager->usertype==2){
													echo "(群主)";
												}
											</php>
											</a>
										</li>
										</volist>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="share">
					<a class="addshare" href="__APP__/share/addshare/g/group/id/{$group:id}"><img src="../Public/images/share.gif"/></a>
				</div>
			</div>
<include file="Public:footer" />